module SRI
  EQUALS_PROC													= Proc.new {|a,b| a == b}
  GREATER_THAN_PROC										= Proc.new {|a,b| a > b}
  GREATER_THAN_OR_EQUAL_PROC					= Proc.new {|a,b| a >= b}
  LESS_THAN_PROC											= Proc.new {|a,b| a < b}
  LESS_THAN_OR_EQUAL_PROC							= Proc.new {|a,b| a <= b}
  AND_PROC														= Proc.new {|a,b| a && b}
  OR_PROC															= Proc.new {|a,b| a || b}
  NOT_PROC														= Proc.new {|a| !a }
  ADD_PROC                            = Proc.new {|a,b| a + b }
  MULTIPLY_PROC                       = Proc.new {|a,b| a * b }

  class Operator < Expression
    attr_accessor :proc
    def initialize( proc )
      @proc = proc
    end
  end

  class UnaryOperator < Operator
    attr_accessor :e1
    def initialize( proc, e1 )
      super( proc )
      @e1 = e1
    end
  end

  class BinaryOperator < Operator
    attr_accessor :e1, :e2
    def initialize( proc, e1, e2 )
      super( proc )
      @e1 = e1
      @e2 = e2
    end
  end
end
